package zy.zy7.maketVIP;

import java.io.Serializable;

public class People implements Serializable {
    private String vipNumber;
    private String name;
    private String password;
    private int credit;
    private String phone;
    private String startDate;

    public People(String vipNumber, String name, String password, int credit, String phone, String startDate) {
        this.vipNumber = vipNumber;
        this.name = name;
        this.password = password;
        this.credit = credit;
        this.phone = phone;
        this.startDate = startDate;
    }

    public String getVipNumber() {
        return vipNumber;
    }

    public void setVipNumber(String vipNumber) {
        this.vipNumber = vipNumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    @Override
    public String toString() {
        return "会员信息{" +
                "会员号='" + vipNumber + '\'' +
                ", 姓名='" + name + '\'' +
                ", 密码='" + password + '\'' +
                ", 积分=" + credit +
                ", 电话='" + phone + '\'' +
                ", 时间=" + startDate +
                '}';
    }

    public void show(){
        System.out.println(this.toString());
    }
    public void changecredit(int credit1){
        this.setCredit(getCredit()+credit1);
        System.out.println("会员积分已变动，请及时查看剩余积分！");
    }
}
